<%@page import="java.sql.Date"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ page import="sever.*,entity.*,util.*,java.util.*,java.text.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%
	request.setCharacterEncoding("utf-8");
	String sname=request.getParameter("sname");
	String sex=request.getParameter("sex");
	String telephone=request.getParameter("telephone");
	String qq=request.getParameter("qq");
	String wechat=request.getParameter("wechat");
	int gradeid=Integer.parseInt(request.getParameter("gradeid")) ;
	String enterdate=request.getParameter("enterdate");
	String fromcity=request.getParameter("fromcity");
	String birthday=request.getParameter("birthday");
	String address=request.getParameter("address");
	String pass=request.getParameter("pass");
		StudentAdd service=new StudentAdd();
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
		Student stu=new Student( sname,  sex, telephone, qq, wechat, gradeid,
		df.parse("1998-03-07"), fromcity, df.parse("1998-03-07"),  address, pass);
		int i=service.add2(stu);
		out.print(i);
		%>
</body>
</html>